package com.strategy;

public class Dog implements Comparable<Dog> {
    public int weight;
    public Dog(int weight){
        this.weight = weight;
    }

    @Override
    public int compareTo(Dog dog) {
        return this.weight > dog.weight ? -1 : 1;
    }

    @Override
    public String toString() {
        return "Dog{" +
                "weight=" + weight +
                '}';
    }
}
